package org.dlsu.mt.parser;

/**
 * The LexerInterface acts as an bridge between the parser and the
 * lexical analyzer. This contains the set of tokenized tokens by the Lexical Analyzer
 * The interface specifies basic methods for getting the next tokens that
 * need to be implemented. An important note for implementing this interface
 * would be the clone method. The clone method should be able to clone the
 * current position of the tokenizer. Another requirement is the clone should
 * be generating Word objects that are not mere references to the Word objects
 * generated by the original.
 */

public interface LexerInterface
{

   /**
     * Returns the next token in the form of a Word oject
     *
     * @return     the next token
     */
	public Word nextToken();

    /**
     * Tests if there are more tokens available from this tokenizer's string.
     * If this method returns <tt>true</tt>, then a subsequent call to
     * <tt>nextToken</tt> with no argument will successfully return a token.
     *
     * @return  <code>true</code> if and only if there is at least one token
     *          in the string after the current position; <code>false</code>
     *          otherwise.
     */
	public boolean hasMoreTokens();

	/**
	 * Returns the a clone or a copy of the word. The clone method should be able
	 * to clone the current position of the tokenizer. The clone geenrated
	 * should be generating Word objects that are not mere references to the
	 * Word objects generated by the original.
	 *
	 * @return the clone of this object
	 */
	public Object clone();

}